package com.yuelife.user.service.impl;

import com.yuelife.user.dao.HomeMapper;
import com.yuelife.user.pojo.Home;
import com.yuelife.user.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: yangsen
 * @Date: 2020/7/1 11:17
 */
@Service
public class HomeServiceImpl implements HomeService {
    @Autowired
    HomeMapper homeMapper;

    @Override
    public Home selectByid(Integer id) {
        return homeMapper.selectByPrimaryKey(id);
    }

    @Override
    public void addNewHome(Home home) {
        homeMapper.insertSelective(home);
    }
}
